package com.gla.giliair.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * cabin_info
 * @author 
 */
@ApiModel(value="com.gla.giliair.entity.CabinInfo舱位信息表")
@Data
public class CabinInfo implements Serializable {
    /**
     * 舱位信息id
     */
    @ApiModelProperty(value="舱位信息id")
    private Long cabinInfoId;

    /**
     * 航班外键id
     */
    @ApiModelProperty(value="航班外键id")
    private Long flightId;

    /**
     * 头等舱价格
     */
    @ApiModelProperty(value="头等舱价格")
    private BigDecimal firstClassPrice;

    /**
     * 商务舱价格
     */
    @ApiModelProperty(value="商务舱价格")
    private BigDecimal businessClassPrice;

    /**
     * 经济舱价格
     */
    @ApiModelProperty(value="经济舱价格")
    private BigDecimal economyClassPrice;

    /**
     * 头等舱实际使用数
     */
    @ApiModelProperty(value="头等舱实际使用数")
    private Integer firstClassUsedTotality;

    /**
     * 商务舱实际使用数
     */
    @ApiModelProperty(value="商务舱实际使用数")
    private Integer businessClassUsedTotality;

    /**
     * 经济舱实际使用数
     */
    @ApiModelProperty(value="经济舱实际使用数")
    private Integer economyClassUsedTotality;

    /**
     * 折扣幅度外键id
     */
    @ApiModelProperty(value="折扣幅度外键id")
    private Long discountId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CabinInfo other = (CabinInfo) that;
        return (this.getCabinInfoId() == null ? other.getCabinInfoId() == null : this.getCabinInfoId().equals(other.getCabinInfoId()))
            && (this.getFlightId() == null ? other.getFlightId() == null : this.getFlightId().equals(other.getFlightId()))
            && (this.getFirstClassPrice() == null ? other.getFirstClassPrice() == null : this.getFirstClassPrice().equals(other.getFirstClassPrice()))
            && (this.getBusinessClassPrice() == null ? other.getBusinessClassPrice() == null : this.getBusinessClassPrice().equals(other.getBusinessClassPrice()))
            && (this.getEconomyClassPrice() == null ? other.getEconomyClassPrice() == null : this.getEconomyClassPrice().equals(other.getEconomyClassPrice()))
            && (this.getFirstClassUsedTotality() == null ? other.getFirstClassUsedTotality() == null : this.getFirstClassUsedTotality().equals(other.getFirstClassUsedTotality()))
            && (this.getBusinessClassUsedTotality() == null ? other.getBusinessClassUsedTotality() == null : this.getBusinessClassUsedTotality().equals(other.getBusinessClassUsedTotality()))
            && (this.getEconomyClassUsedTotality() == null ? other.getEconomyClassUsedTotality() == null : this.getEconomyClassUsedTotality().equals(other.getEconomyClassUsedTotality()))
            && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCabinInfoId() == null) ? 0 : getCabinInfoId().hashCode());
        result = prime * result + ((getFlightId() == null) ? 0 : getFlightId().hashCode());
        result = prime * result + ((getFirstClassPrice() == null) ? 0 : getFirstClassPrice().hashCode());
        result = prime * result + ((getBusinessClassPrice() == null) ? 0 : getBusinessClassPrice().hashCode());
        result = prime * result + ((getEconomyClassPrice() == null) ? 0 : getEconomyClassPrice().hashCode());
        result = prime * result + ((getFirstClassUsedTotality() == null) ? 0 : getFirstClassUsedTotality().hashCode());
        result = prime * result + ((getBusinessClassUsedTotality() == null) ? 0 : getBusinessClassUsedTotality().hashCode());
        result = prime * result + ((getEconomyClassUsedTotality() == null) ? 0 : getEconomyClassUsedTotality().hashCode());
        result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cabinInfoId=").append(cabinInfoId);
        sb.append(", flightId=").append(flightId);
        sb.append(", firstClassPrice=").append(firstClassPrice);
        sb.append(", businessClassPrice=").append(businessClassPrice);
        sb.append(", economyClassPrice=").append(economyClassPrice);
        sb.append(", firstClassUsedTotality=").append(firstClassUsedTotality);
        sb.append(", businessClassUsedTotality=").append(businessClassUsedTotality);
        sb.append(", economyClassUsedTotality=").append(economyClassUsedTotality);
        sb.append(", discountId=").append(discountId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}